<template>
 <div>
        <template v-if="taskArray.length===0">
            <p style="text-align: center; color:red">今日任务未制定</p>
        </template>
        <ul class="todo-main" v-else>
            <ItemContent v-for="(task, index) in taskArray" :deleteTaskById="deleteTaskById"
            :key="index" :newTaskobj='task' :updateTaskstatus='updateTaskstatus' ></ItemContent>
         </ul>
    </div>
</template>
<script scoped>
import ItemContent from  './ItemContent.vue';
export default {
    name: 'ListContent',
    components:{
        ItemContent
    },
    props:['taskArray','updateTaskstatus','deleteTaskById']
    
}


</script>
<style scoped>
.todo-main {
    margin-left: 0px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0px;
}

.todo-empty {
    height: 40px;
    line-height: 40px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding-left: 5px;
    margin-top: 10px;
}

  
</style>